package com.test.pdproject.util;
/**
 * @author sun
 *
 */
/**
 * @author sun
 *
 */
/**
 * @author sun
 *
 */
public class StateEnum {

    /**
     * 系统状态
     */
    public enum SystemState {

        ERROR("错误", 2), NORMAL("正常", 1), DELETE("删除", 3);

        private SystemState(String name, int value) {
            this.name = name;
            this.value = value;
        }

        /**
         * 枚举名称
         */
        private String name;

        /**
         * 枚举值
         */
        private Integer value;

        /**
         * 获得枚举类型的值 必须实现该方法，配合根据值获取枚举使用
         */
        public int getValue() {
            return this.value;
        }

        /**
         * 获得枚举类型对应的名称
         */
        public String getName() {
            return this.name;
        }
    }
    public enum AppResponseState {
        SUCCESS("0000", "成功"),
        ERROR("0001","操作失败，请稍候重试"), // 用户参数完整，数据通不过
        PARAM_ERROR("0002","参数错误或者参数不完整"),  // 用户参数错误
        NO_PERMISSION("0003","无接口访问权限"),

        UNKNOWN("0010","未知接口异常");

        private String name;

        private String msg;


        private AppResponseState(String name, String msg) {
            this.name = name;
            this.msg = msg;

        }

        public String getName() {
            return name;
        }


        public String getMsg() {
            return msg;
        }

    }
}
